<?php
class Core_Data_Mappers_Rulemenu extends Core_Data_Mappers_Abstract {
	protected $_businessclass ='Core_Business_Rulemenu';
	protected $_modelclass ='Core_Data_Models_Rulemenu';
	protected $_map=array("Ruleid"=>"ruleid","Menuitemid"=>"menuitemid");
	
	public function exists($object) {
		if($object instanceof $this->_businessclass) {
			$data = $this->getDbTable()->fetchRow(array("ruleid = ?"=>$object->Ruleid,"menuitemid = ?"=>$object->Menuitemid));
			if(isset($data) && count($data)==1) 
				return true;
		}
		return false;
		
	}
	
	public function add($object) {
		throw new Exception("add method of Core_Data_Mappers_Rulemenu object mustn't implemented");
	}
	public function edit($object) {
		throw new Exception("Edit method of Core_Data_Mappers_Rulemenu object mustn't implemented");
	}
	
	
}
?>